/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.hiddendanger.service.api;

import com.koron.common.bean.StaffBean;
import com.koron.common.domain.DataBean;
import com.koron.hiddendanger.domain.FreeSnap;
import com.koron.hiddendanger.domain.HiddenDangerDiscovery;
import com.koron.risk.domain.LocalHazardSource;
import org.springframework.web.multipart.MultipartFile;
import org.swan.bean.MessageBean;

import java.util.Date;
import java.util.List;

public interface FreeSnapService {
    /**
     * 保存或提交随手拍
     *
     * @param snap
     * @param operationType
     * @return
     */
    MessageBean<Integer> saveOrCommit(StaffBean user, FreeSnap snap, Integer operationType, MultipartFile[] files, String delFileAddress, String keepFileAddress);

    /**
     * 根据条件查询随手拍列表
     *
     * @param description
     * @param corpCode
     * @param gridCode
     * @param state
     * @param submitTimeStart
     * @param submitTimeEnd
     * @param departCode
     * @param submitCode
     * @param start
     * @param rows
     * @return
     */
    MessageBean<DataBean<FreeSnap>> queryByCondition(StaffBean user, String description, String corpCode, String gridCode,
                                                     Integer state, Date submitTimeStart, Date submitTimeEnd, String departCode,
                                                     String submitCode, String submitDepartmentName, Integer start, Integer rows,String keyword);

    /**
     * 根据主键删除随手拍数据，可批量删除
     *
     * @param idList
     * @return
     */
    MessageBean<Integer> deleteBatch(List<String> idList);

    /**
     * 确认随手拍操作
     *
     * @param snap
     * @param feedback
     * @return
     */
    MessageBean<Integer> confirmFreeSnap(FreeSnap snap, StaffBean user, Integer oprationType, String feedback, LocalHazardSource localHazardSource, HiddenDangerDiscovery dangerDiscovery);

    /**
     * 根据主键获取随手拍详情
     *
     * @param id
     * @return
     */
    MessageBean<FreeSnap> queryOne(String id);

    /**
     * 随手拍导出
     * @param user
     * @param description
     * @param corpCode
     * @param gridCode
     * @param state
     * @param submitTimeStart
     * @param submitTimeEnd
     * @param departCode
     * @param submitCode
     * @return
     */
    List<FreeSnap> export(StaffBean user, String description, String corpCode, String gridCode, Integer state, Date submitTimeStart, Date submitTimeEnd, String departCode, String submitCode);

}
